﻿@model IEnumerable<eBusiness.Models.Status>
<table class="dashboardTable">
    <tr>
        <th>
            Name
        </th>
        <th>
            Description
        </th>
        <th>
            CreatedBy
        </th>
        <th>
            CreatedDate
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                <a href="@Url.Action("Details", "Status", new { id = @item.ID })">@Html.DisplayFor(modelItem => item.Name)</a>
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Description)
            </td>
            <td>
                @if (!string.IsNullOrEmpty(item.CreatedBy.ToString()))
                {
                    var membershipUser = Membership.GetUser(item.CreatedBy);
                    if (membershipUser != null)
                    {
                        var usr = membershipUser.UserName;
                    @usr
                    }
                }
            </td>
            <td>
                @if (!string.IsNullOrEmpty(@item.CreatedDate.ToString()))
                {
                    @item.CreatedDate.ToString("dd/MM/yyyy")
                }
            </td>
        </tr>
    }
</table>
